package com.aqie.optimize.controller;

import com.aqie.optimize.bean.Actor;
import com.aqie.optimize.service.IActorService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: aqie
 * @create: 2020-12-24 20:38
 **/
@RestController
@AllArgsConstructor
@RequestMapping("actor")
public class ActorController {
    private IActorService actorService;
    @GetMapping("get/{id}")
    public Actor getActorById(@PathVariable short id){
        Actor actor = actorService.getActorById(id);
        return actor;
    }
}
